﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class UIMain : MonoBehaviour
{
    public Text score;
	
	// Update is called once per frame
	void Update ()
    {
        score.text = GameServer.getSingleton().score.ToString();
	}

    //点击重新开始游戏
    public void ClickRestart()
    {
        GameServer.getSingleton().reset();
        SceneManager.LoadScene("Main");
    }

    //点击返回开始界面
    public void ClickBack()
    {
        SceneManager.LoadScene("Start");
    }

    //点击退出游戏
    public void ClickExit()
    {
        Application.Quit();
    }
}
